/* SPAM3-UK Ford汽车信息页面样式 */

/* 基础样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    color: #003f82;
    text-align: center;
    margin-bottom: 30px;
}

/* 筛选器样式 */
.filters {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

input, select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

input:focus, select:focus {
    outline: none;
    border-color: #007bff;
}

/* 统计卡片样式 */
.stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-card {
    background-color: #e9ecef;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    min-width: 120px;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* 按钮样式 */
.btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

.btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-success {
    background-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Trim和Scrape按钮特殊样式 */
.trim-btn, .scrape-btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.trim-btn {
    background-color: #17a2b8;
    color: white;
}

.trim-btn:hover {
    background-color: #138496;
}

.scrape-btn {
    background-color: #28a745;
    color: white;
}

.scrape-btn:hover {
    background-color: #218838;
}

.scrape-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 车辆卡片样式 */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.vehicle-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.vehicle-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.vehicle-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.vehicle-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.vehicle-info {
    margin-bottom: 8px;
    font-size: 14px;
}

.vehicle-info strong {
    color: #666;
}

/* Trim模态框样式 */
.trim-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.trim-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
}

.close-modal:hover {
    color: #333;
}

.trim-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #f9f9f9;
}

.trim-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.trim-price {
    font-size: 18px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 10px;
}

.trim-specs {
    margin-top: 10px;
}

.spec-category {
    margin-bottom: 15px;
}

.category-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 2px solid #007bff;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #eee;
}

.spec-name {
    font-weight: 500;
    color: #666;
}

.spec-value {
    color: #333;
    font-weight: bold;
}

/* 加载状态样式 */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误状态样式 */
.error {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }
    
    .stats {
        flex-direction: column;
    }
    
    .vehicle-grid {
        grid-template-columns: 1fr;
    }
    
    .trim-modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* 实用类 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-15 {
    margin-bottom: 15px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-15 {
    margin-top: 15px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* 多页面类型适配指示器 */
.page-type-indicator {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 5px;
}

.page-type-modern {
    background-color: #28a745;
    color: white;
}

.page-type-classic {
    background-color: #ffc107;
    color: #212529;
}

.page-type-performance {
    background-color: #dc3545;
    color: white;
}

/* 分页控制样式 */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 10px;
}

.pagination-info {
    color: #666;
    font-size: 14px;
}

.pagination-settings {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-settings label {
    font-size: 14px;
    color: #666;
}

.pagination-settings select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-number {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.page-number:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.page-number.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.page-number.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* 响应式分页 */
@media (max-width: 768px) {
    .pagination-controls {
        flex-direction: column;
        text-align: center;
    }
    
    .pagination-buttons {
        order: 1;
    }
    
    .pagination-info {
        order: 2;
    }
    
    .pagination-settings {
        order: 3;
    }
}
